import service from '../utils/axios';

export default function axiosLink(url, method = 'GET', data) {
    // debugger
    return new Promise((resolve, reject) => {
        service
            .request({
                url,
                method,
                params: data
            })
            .then(ok => {
                resolve(ok);
            })
            .catch(err => {
                reject(err);
            });
    });
}